package com.yxwl.demo.ui.adapter;

import android.content.Context;
import android.view.ViewGroup;
import android.widget.TextView;


import com.print.base.bean.DeviceItem;
import com.yxwl.demo.R;


public class BlueDeviceViewAdapter extends BaseRecyclerViewAdapter<DeviceItem> {


    public BlueDeviceViewAdapter(Context context) {
        super(context);
    }

    @Override
    protected int getLayoutId(ViewGroup parent, int position) {
        return R.layout.item_mac;
    }

    @Override
    protected void bindData(BaseViewHolder holder, DeviceItem data, int position) {
        super.bindData(holder, data, position);
        if (data == null) return;
        ((TextView) holder.getView(R.id.item_name)).setText(data.name);
        ((TextView) holder.getView(R.id.item_mac)).setText(data.address);
        setViewClick(holder.itemView, 1, position, data);
    }

}